<template>
  <div class="game">
    <h2>游戏列表</h2>
    <slot :games="games" ></slot>
    <slot name="footer" a="我结合了具名+作用域" ></slot>
  </div>
</template>

<script setup lang="ts">
let games = [
  { id: 1, name: '塞尔达传说' },
  { id: 2, name: '原神' },
  { id: 3, name: '巫师3' },
]
</script>

<style scoped>
.game {
  background-color: skyblue;
  border-radius: 10px;
  padding: 10px;
  width: 300px;
  height: 300px;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5);
}
h2 {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  background-color: orange;
}

</style>